/*
	mux8.v
	Template for 8-ways mux
	
	This project and file(s) are released under GNU GPL v3.
	Please find license file from root directory.
	Meng Sun (c) 2013 <leon.meng.sun@gmail.com>
*/

module mux8 (A, SEL, Y);

input [7:0] A;
input [2:0] SEL;
output Y;

wire [7:0] A;
wire [2:0] SEL;
reg Y;

always @ (A or SEL)
begin
	case (SEL)
	3'b000: Y = A[0];
	3'b001: Y = A[1];
	3'b010: Y = A[2];
	3'b011: Y = A[3];
	3'b100: Y = A[4];
	3'b101: Y = A[5];
	3'b110: Y = A[6];
	3'b111: Y = A[7];
	default: Y = 1'bz;
	endcase
end

endmodule